{% extends "base.html" %}
{% block content %}
<section class="hero">
    <h1 class="title">设置</h1>
    <p class="subtitle">配置主题、数据来源与访问控制。</p>
</section>

<!-- 交付数据上传 -->
<section class="panel">
    <div class="panel-header">
        <h2>交付数据上传</h2>
    </div>
    <div class="panel-body">
        <div class="upload-section">
            <label class="label">交付数据文件</label>
            <p class="upload-description">上传包含FT项目、需求吞吐率、交付数量等信息的Excel文件</p>
            
            <div class="upload-area" id="deliveryUploadArea">
                <div class="upload-content">
                    <span class="upload-icon">📋</span>
                    <p class="upload-text">点击或拖拽交付数据文件到此处</p>
                    <p class="upload-hint">支持 .xlsx, .xls 格式，最大 10MB</p>
                </div>
                <input type="file" id="deliveryFileInput" accept=".xlsx,.xls" style="display: none;" />
            </div>
            
            <div class="upload-progress" id="deliveryUploadProgress" style="display: none;">
                <div class="progress-bar">
                    <div class="progress-fill" id="deliveryProgressFill"></div>
                </div>
                <span class="progress-text" id="deliveryProgressText">0%</span>
            </div>
            
            <div class="upload-result" id="deliveryUploadResult" style="display: none;">
                <div class="result-icon" id="deliveryResultIcon">✓</div>
                <div class="result-content">
                    <p class="result-title" id="deliveryResultTitle">上传成功</p>
                    <p class="result-detail" id="deliveryResultDetail">交付数据已处理完成</p>
                </div>
            </div>
            
            <div class="upload-actions">
                <button class="action subtle" id="deliveryClearUpload" style="display: none;">清除文件</button>
                <button class="action" id="deliveryProcessFile" style="display: none;">处理数据</button>
            </div>
        </div>
    </div>
</section>

<!-- 工作量数据上传 -->
<section class="panel">
    <div class="panel-header">
        <h2>工作量数据上传</h2>
    </div>
    <div class="panel-body">
        <div class="upload-section">
            <label class="label">工作量数据文件</label>
            <p class="upload-description">上传包含人员姓名、饱和度、代码当量、工时等信息的Excel文件</p>
            
            <div class="upload-area" id="workloadUploadArea">
                <div class="upload-content">
                    <span class="upload-icon">👥</span>
                    <p class="upload-text">点击或拖拽工作量数据文件到此处</p>
                    <p class="upload-hint">支持 .xlsx, .xls 格式，最大 10MB</p>
                </div>
                <input type="file" id="workloadFileInput" accept=".xlsx,.xls" style="display: none;" />
            </div>
            
            <div class="upload-progress" id="workloadUploadProgress" style="display: none;">
                <div class="progress-bar">
                    <div class="progress-fill" id="workloadProgressFill"></div>
                </div>
                <span class="progress-text" id="workloadProgressText">0%</span>
            </div>
            
            <div class="upload-result" id="workloadUploadResult" style="display: none;">
                <div class="result-icon" id="workloadResultIcon">✓</div>
                <div class="result-content">
                    <p class="result-title" id="workloadResultTitle">上传成功</p>
                    <p class="result-detail" id="workloadResultDetail">工作量数据已处理完成</p>
                </div>
            </div>
            
            <div class="upload-actions">
                <button class="action subtle" id="workloadClearUpload" style="display: none;">清除文件</button>
                <button class="action" id="workloadProcessFile" style="display: none;">处理数据</button>
            </div>
        </div>
    </div>
</section>

<!-- 缺陷数据上传 -->
<section class="panel">
    <div class="panel-header">
        <h2>缺陷数据上传</h2>
    </div>
    <div class="panel-body">
        <div class="upload-section">
            <label class="label">缺陷数据文件</label>
            <p class="upload-description">上传包含缺陷编号、严重程度、修复时间等信息的Excel文件</p>
            
            <div class="upload-area" id="defectUploadArea">
                <div class="upload-content">
                    <span class="upload-icon">🐛</span>
                    <p class="upload-text">点击或拖拽缺陷数据文件到此处</p>
                    <p class="upload-hint">支持 .xlsx, .xls 格式，最大 10MB</p>
                </div>
                <input type="file" id="defectFileInput" accept=".xlsx,.xls" style="display: none;" />
            </div>
            
            <div class="upload-progress" id="defectUploadProgress" style="display: none;">
                <div class="progress-bar">
                    <div class="progress-fill" id="defectProgressFill"></div>
                </div>
                <span class="progress-text" id="defectProgressText">0%</span>
            </div>
            
            <div class="upload-result" id="defectUploadResult" style="display: none;">
                <div class="result-icon" id="defectResultIcon">✓</div>
                <div class="result-content">
                    <p class="result-title" id="defectResultTitle">上传成功</p>
                    <p class="result-detail" id="defectResultDetail">缺陷数据已处理完成</p>
                </div>
            </div>
            
            <div class="upload-actions">
                <button class="action subtle" id="defectClearUpload" style="display: none;">清除文件</button>
                <button class="action" id="defectProcessFile" style="display: none;">处理数据</button>
            </div>
        </div>
    </div>
</section>


{% endblock %}